#pragma once
#include "UIlib.h"
#include "utility.h"

class CAlterPasswordDlg :
	public WindowImplBase
{
public:
	CAlterPasswordDlg(HWND hParentWnd, stUser* pUser);
	virtual ~CAlterPasswordDlg();
	LPCTSTR GetWindowClassName() const { return _T("CAlterPasswordDlg"); }
	virtual CDuiString GetSkinFile() { return _T("AlterPassword.xml"); }
	virtual CDuiString GetSkinFolder() { return  _T("skin"); }
	//virtual UILIB_RESOURCETYPE GetResourceType() const { return UILIB_ZIPRESOURCE; }
	virtual void InitWindow();
	virtual LRESULT OnNcActivate(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& bHandled);

	DUI_DECLARE_MESSAGE_MAP()
	void OnOKBtnClick(TNotifyUI& msg);
	void OnOldPwEditKillFocus(TNotifyUI& msg);
	/*void OnNewPwEditKillFocus(TNotifyUI& msg);
	void OnCfmPwEditKillFocus(TNotifyUI& msg);*/
	void OnEditTxtChange(TNotifyUI& msg);
private:
	CLabelUI*	m_pLabTitle = nullptr;
	HWND		m_hParentWnd;
	stUser*		m_pstUser;
	CEditUI*	m_pOldEdit;
	CEditUI*	m_pNewEdit;
	CEditUI*	m_pCfmEdit;
	COptionUI*	m_pCfmPwdOpt;
	wstring		m_strPassword;
};

